package lianxi06;

import java.util.ArrayList;
import java.util.Collections;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86131
 * Date: 2024-04-21
 * Time: 17:41
 */
public class Test {
    public static void main(String[] args) {

        //创建奖池
        ArrayList<Integer> list = new ArrayList<>();
        Collections.addAll(list,10,5,20,50,100,200,50,800,2,80,300,700);

        MyThread t1 = new MyThread(list);  //类中有集合的构造方法,所以要把list传递过去
        MyThread t2 = new MyThread(list);

        t1.setName("抽奖箱1");
        t2.setName("抽奖箱2");

        t1.start();
        t2.start();

    }
}
